import request from '@/utils/request'

export default {

    //条件查询医院科室带分页
    findByPage(current,limit,searchObj) {
        return request ({
            url: `/admin/hosp/department/findByPage/${current}/${limit}`,
            method: 'get',
            params:searchObj
        })
    },
    //根据id查询医院科室
    findById(id) {
        return request ({
            url: `/admin/hosp/department/findById/${id}`,
            method: 'get'
        })
    },
    //添加医院科室
    saveDepartment(dept) {
        return request({
            url: `/admin/hosp/department/saveDepartment`,
            method: 'post',
            data: dept
        })
    },
    //根据id删除医院科室
    deleteById(id) {
        return request({
            url: `/admin/hosp/department/deleteById/${id}`,
            method: 'delete'
        })
    },
    //根据idList批量删除医院科室
    batchDelete(idList) {
        return request({
            url: `/admin/hosp/department/batchDelete`,
            method: 'delete',
            data: idList
        })
    },
    //修改医院科室
    updateDepartment(dept) {
        return request({
            url: `/admin/hosp/department/updateDepartment`,
            method: 'post',
            data: dept
        })
    },

    
    //根据hascode查询所有科室
    getDeptListByHascode(hoscode) {
        return request ({
            url: `/admin/hosp/department/getDeptListByHascode/${hoscode}`,
            method: 'get'
        })
    },
}